<?php

// 4/25/2010: immanuel192 write this action to return bible translation books

if (!defined('EXPONENT')) exit('');

global $db;
// get t2 value, just for fun
$t2=$_GET['t2'];
$id = -1;
if (isset($_REQUEST['id']) && isset($_REQUEST['book']))
{
	$id = intval($_REQUEST['id']);
	$book = intval($_REQUEST['book']);
	$data=$db->selectObject("bible_info","bible_id = " . $id . " AND bindex = {$book}");
	echo $t2; 
	for ($i=1;$i<=$data->chapters;$i++)
		echo "<option value={$i}>{$i}</option>";
}
else
{
	die();
}
?>
